package no.ffi.gismoidm.attrex;

import java.util.Properties;

/**
 *
 * @author anders
 */
public class Not extends BooleanOperator {
    private BooleanOperand op1;
    public Not(BooleanOperand op1) { this.op1 = op1; }
    @Override
    public BooleanValue getBooleanValue(Properties attributes) throws AttributeEvaluationException {
        return new BooleanValue(!op1.getBooleanValue(attributes).truthValue());
    }

    public String toString() {
        return "not(" + op1.toString() + ")";
    }

}
